package com.itheima.sh.consumer.client.fallback;

import com.itheima.sh.consumer.client.UserFeignApi;
import com.itheima.sh.consumer.pojo.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @作者 itcast
 * @创建日期 2021/5/16 10:34
 **/
@Slf4j
@Component
public class UserFeignApiFallback implements UserFeignApi {
    @Override
    public User queryById(String id) {
//        log.error("服务降级方法被触发==> {}",id);
//        Map map = new HashMap();
//        map.put("msg","Feign声明的服务降级方法被触发");
        return null;
    }

    @Override
    public String save(User user) {
        return null;
    }
}
